/**
* 版权声明：厦门睿商网络科技有限公司 版权所有 违者必究
* 日    期：2020-05-06
*/
package com.rzico.basics.entity;

import lombok.Data;
import java.util.Date;
import javax.persistence.*;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * <pre>
 *   企业客户数据库对象
 * </pre>
 * @author Rzico Boot
 * @version 1.0
 */
@Data
@JsonIgnoreProperties(value = {"handler"})
@JsonInclude(JsonInclude.Include.NON_NULL)
@Table(name = "wx_company")
public class Company{
    @Id
    @ApiModelProperty(value = "" )
    protected Long id;

    @ApiModelProperty(value = "创建日期" )
    protected java.util.Date createDate;

    @ApiModelProperty(value = "修改日期" )
    protected java.util.Date modifyDate;

    @ApiModelProperty(value = "企业名称" )
    protected String name;

    @ApiModelProperty(value = "手机号" )
    protected String mobile;

    @ApiModelProperty(value = "备用电话" )
    protected String phone;

    @ApiModelProperty(value = "邮箱" )
    protected String email;

    @ApiModelProperty(value = "所在地" )
    protected Long areaId;

    @ApiModelProperty(value = "所在区" )
    protected String areaName;

    @ApiModelProperty(value = "地址" )
    protected String address;

    @JsonIgnore
    @ApiModelProperty(value = "是否删除" ,hidden = true )
    protected Boolean deleted;

    @ApiModelProperty(value = "所属分类")
    protected Long companyCategoryId;

    @ApiModelProperty(value = "所属部门" )
    protected String officeId;

    @ApiModelProperty(value = "绑定用户" )
    protected String userId;

    @ApiModelProperty(value = "企业编号" )
    protected String code;

    @ApiModelProperty(value = "绑定会员" )
    protected Long memberId;

    @ApiModelProperty(value = "归属企业" )
    protected Long enterpriseId;

    @JsonIgnore
    @ApiModelProperty(value = "创建者" ,hidden = true )
    protected String createBy;

    @JsonIgnore
    @ApiModelProperty(value = "更新者" ,hidden = true )
    protected String modifyBy;


    @ApiModelProperty(value = "推荐用户id" )
    protected Long recommendMemberId;

    @ApiModelProperty(value = "企业分类", hidden = true)
    @JsonIgnore
    protected CompanyCategory companyCategory;

    public String getCompanyCategoryName() {
        CompanyCategory companyCategory = getCompanyCategory();
        if (null != companyCategory){
            return companyCategory.getName();
        }else{
            return "";
        }
    }

    public void setCompanyCategoryName(String companyCategoryName) {

    }
}
